﻿using System.Web.Mvc;
using System.Web.Routing;

namespace Start
{
    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            // Index
            routes.MapRoute(
                "Default",
                "",
                new { controller = "Person", action = "Index" }
                );

            // Individual Person
            routes.MapRoute(
                "IndividualPerson",
                "person/individual/{id}",
                new { controller = "Person", action = "IndividualPerson" }
                );
        }

        protected void Application_Start()
        {
            RegisterRoutes(RouteTable.Routes);
        }
    }
}